package com.bwie.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bwie.dto.Company;
import com.bwie.dto.Person;
import com.bwie.dto.Position;
import com.bwie.dto.User;
import com.bwie.mapper.WorkMapper;
@Service
public class WorkServiceImpl implements WorkService {

	@Autowired(required=false)
	private WorkMapper mapper;
	@Override
	public List<Person> getPersonList(Map<Object, Object> map) {
		// TODO Auto-generated method stub
		return mapper.getPersonList(map);
	}
	@Override
	public List<Company> getCompanyList() {
		// TODO Auto-generated method stub
		System.out.println(123);
		return mapper.getCompanyList();
	}

	@Override
	public List<Position> getPositionList() {
		// TODO Auto-generated method stub
		return mapper.getPositionList();
	}
	@Override
	public Integer getPersonCount(Map<Object, Object> map) {
		// TODO Auto-generated method stub
		return mapper.getPersonCount(map);
	}
	@Override
	public void add(Person person) {
		// TODO Auto-generated method stub
		mapper.add(person);
	}
	@Override
	public Integer add(User user2) {
		// TODO Auto-generated method stub
		return mapper.addUser2(user2);
	}
	@Override
	public Person findObjectById(Person person) {
		// TODO Auto-generated method stub
		return mapper.findObjectById(person);
	}
	@Override
	public void update(Person person) {
		// TODO Auto-generated method stub
		mapper.update(person);
	}
	@Override
	public void addall(Person person) {
		// TODO Auto-generated method stub
		mapper.addall(person);
	}
	@Override
	public User getOneByUser(User user2) {
		// TODO Auto-generated method stub
		return mapper.getOnerByUser(user2);
	}
	/****************/

	public WorkMapper getMapper() {
		return mapper;
	}

	public void setMapper(WorkMapper mapper) {
		this.mapper = mapper;
	}
	
}
